import request from '@/utils/request'
// 登录账号
export const api_users_checkLogin = data => request({
    method: 'post',
    url: '/users/checkLogin',
    data
})
// 账号添加
export const api_users_add = data => request({
    method: 'post',
    url: '/users/add',
    data
})
// 获取用户列表
export const api_users_list = params => request({
    method: 'get',
    url: '/users/list',
    params
})
// 验证账号是否存在
export const api_users_repeat = data => request({
    method: 'post',
    url: '/users/repeat',
    data
})
// 删除用户
export const api_users_del = params => request({
    method: 'get',
    url: '/users/del',
    params
})

// 修改账号
export const api_users_editt = data => request({
    method: 'post',
    url: '/users/edit',
    data
})
// 批量删除账号

export const api_users_batchdel = data => request({
    method: 'post',
    url: '/users/batchdel',
    data
})

// 获取用户个人信息
export const api_users_info = () => request({
    method: 'get',
    url: '/users/info',
})
// 修改个人头像
export const api_users_avataredit = params => request({
    method: 'get',
    url: '/users/avataredit',
    params
})
// 修改密码
export const api_users_editpwd = data => request({
    method: 'post',
    url: '/users/editpwd',
    data
})
// 检查旧密码是否正确
export const api_users_checkoldpwd = params => request({
    method: 'get',
    url: '/users/checkoldpwd',
    params
})

// 添加商品
export const api_goods_add = data => request({
    method: 'post',
    url: '/goods/add',
    data
})
// 获取商品列表

export const api_goods_list = params => request({
    method: 'get',
    url: '/goods/list',
    params
})
// 修改商品

export const api_goods_edit = data => request({
    method: 'post',
    url: '/goods/edit',
    data
})

// 删除商品
export const api_goods_del = params => request({
    method: 'get',
    url: '/goods/del',
    params
})



